<jsp:include page="header.jsp" />
<%@page import="java.util.*,ftn.dto.*"%>
<jsp:useBean id="nastavnici" class="java.util.ArrayList" scope="request" />
<jsp:useBean id="odseci" class="java.util.ArrayList" scope="request" />

<title>Predmeti</title>
<LINK rel="stylesheet" type="text/css" href="/ftn/css/style.css">
<LINK rel="stylesheet" type="text/css" href="/ftn/css/theme.css">
</head>

<body>
	<table width="1024" border="0">
    	<tr align="left"> 
      		<td width="260" rowspan="3" valign="top"> 
          		<div id="box_240"> 
		        <div id="jobs_green"></div>
        		<div id="content"> 		
	          		<span class="homeLink"> 
						<a href="../control/PrepareCreateOdsekController">Dodaj odsek</a><br />
					</span>	
	            </div>
      		    <div id="footer"></div>
          		</div>

				<jsp:include page="menu.jsp"/>
          	</td>
          	
			<!-- end of menu part -->                		
			<td width="740" height="21" valign="top">       
				<div id="box_460">
				<div id="inbox_green"></div>
				<div id="content">       
					<form action="../control/CreatePredmetController" method="post"><br>
						<table border="0" cellpadding="3" cellspacing="0" align="center">
							<tr>
								<td><b>Naziv predmeta:</b></td>
								<td><input name="naziv" type="text" class="textfield" size="30"></td>
							</tr>
							<tr>
								<td><div align="right"><var>Odsek:</var></div></td>
								<td>
									<select name="idOdseka">
							<%
									OdsekDTO odsek = null;
									for (int i = 0 ; i < odseci.size(); i++) {
										odsek = (OdsekDTO)odseci.get(i);
							%>
										<option value="<%=odsek.getIdOdseka() %>"><%=odsek.getNaziv() %> </option>
							<%  
									} 
							%>
									</select>
								</td>
							</tr>
						
							<tr>
								<td><div align="right"><var>Nastavnik:</var></div></td>
								<td><select name="idNastavnika">
								<%
									NastavnikDTO nastavnik = null;
									for (int i = 0 ; i < nastavnici.size(); i++) {
										nastavnik = (NastavnikDTO)nastavnici.get(i);
								%>
										<option value="<%=nastavnik.getIdNastavnika() %>"><%=nastavnik.getIme() + " " + nastavnik.getPrezime() %> </option>
								<% 	
									}
								%>
									</select>
								</td>
							</tr>
						
							<tr>	
								<td colspan="2"><center><input type="submit" class="submit" value="Dodaj"></center></td>
							</tr>
						</table>
					</form>
				</div>
				<div id="footer"></div>	
				</div>
			</td>
		</tr>
	</table>
</body>
</html>